<?php
session_start();
header('Content-Type:text/html;charset=utf-8');
require_once($_SERVER['DOCUMENT_ROOT'].'/public/func.php');
$config=require_once($_SERVER['DOCUMENT_ROOT'].'/public/config.php');
if(empty($_SESSION['vip']['account'])){
    echo "<script>alert('请先登陆');window.location.href='/home/contact.php'</script>";
}else{
    $rec=add($config,'comment',"");
    if(!$rec){
        echo "<script>alert('评论失败');window.location.href='/home/contact.php'</script>";
    }
        echo "<script>alert('评论成功');window.location.href='/home/contact.php'</script>";
}